package com.cskaoyan.service;

import com.cskaoyan.bean.po.MarketOrderGoods;
import com.cskaoyan.bean.po.MarketOrderGoodsExample;
import com.cskaoyan.mapper.MarketOrderGoodsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName:GoodsServiceImpl
 * @Auther: HeXianZu
 * @Description:
 * @Date: 2022/10/12 11:20
 */
@Service
public class OrderGoodsServiceImpl implements OrderGoodsService {

    @Autowired
    MarketOrderGoodsMapper marketOrderGoodsMapper;

    @Override
    public List<MarketOrderGoods> orderDetail(Integer id) {
        MarketOrderGoodsExample marketOrderGoodsExample = new MarketOrderGoodsExample();
        MarketOrderGoodsExample.Criteria criteria = marketOrderGoodsExample.createCriteria();
        criteria.andOrderIdEqualTo(id);
        List<MarketOrderGoods> marketOrderGoods = marketOrderGoodsMapper.selectByExample(marketOrderGoodsExample);
        return marketOrderGoods;
    }
}
